//
//  Videocell.swift
//  amicool
//
//  Created by mario-yc on 2017/6/14.
//  Copyright © 2017年 mario-yc. All rights reserved.
//

import UIKit

class VideoCell: UICollectionViewCell{
    
    @IBOutlet weak var img:UIImageView!
    @IBOutlet weak var author: UILabel!
    @IBOutlet weak var title:UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        //CaGradientlayer可以绘制一个充满图层的颜色梯度在一个背景颜色上
        let gradientLayer = CAGradientLayer()
        gradientLayer.frame = CGRect(x: 5, y: (UIScreen.main.bounds.width-40)/2*0.618, width: self.bounds.width, height:30)
        gradientLayer.colors = [UIColor.clear.cgColor,UIColor.black.cgColor]
        self.layer.addSublayer(gradientLayer)
    }
}
